package com.ruoyi.system.service.impl;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.entity.PreventionSafetyPromiseFile;
import com.ruoyi.system.mapper.PreventionSafetyPromiseFileMapper;
import com.ruoyi.system.service.PreventionSafetyPromiseFileService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * <p>
 * 安全承诺卡附件表 服务实现类
 * </p>
 * @since 2023-03-10
 */
@Service("preventionSafetyPromiseFileService")
public class PreventionSafetyPromiseFileServiceImpl implements PreventionSafetyPromiseFileService {

    @Resource
    private PreventionSafetyPromiseFileMapper preventionSafetyPromiseFileMapper;

    @Override
    public PreventionSafetyPromiseFile insert(PreventionSafetyPromiseFile promiseFile) {
        promiseFile.setCreateUser(SecurityUtils.getUsername());
        this.preventionSafetyPromiseFileMapper.insert(promiseFile);
        return promiseFile;
    }

    @Override
    public PreventionSafetyPromiseFile queryById(Integer id) {
        return this.preventionSafetyPromiseFileMapper.queryById(id);
    }
}
